<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>群众最关心的社保问题调研</title>
  <!-- 引入Bootstrap5 CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container mt-5">
  <h2 class="mb-4 text-center">群众最关心的社保问题调研</h2>

  <%-- 显示用户选择结果 --%>
  <%
    String[] concerns = request.getParameterValues("concern");
    if (concerns != null && concerns.length > 0) {
  %>
  <div class="alert alert-info mb-4">
    <strong>您关注的社保领域：</strong>
    <%
      for (String concern : concerns) {
        String chineseName = "";
        switch (concern) {
          case "pension": chineseName = "养老保险"; break;
          case "medical": chineseName = "医疗保险"; break;
          case "unemployment": chineseName = "失业保险"; break;
          case "injury": chineseName = "工伤保险"; break;
          case "maternity": chineseName = "生育保险"; break;
        }
    %>
    <span class="badge bg-primary ms-2"><%= chineseName %></span>
    <% } %>
  </div>
  <% } else if (request.getMethod().equals("POST")) { %>
  <div class="alert alert-danger mb-4">
    请至少选择一项您关心的社保领域！
  </div>
  <% } %>

  <%-- 调研表单 --%>
  <form method="post" action="${pageContext.request.contextPath}${pageContext.request.servletPath}" class="border p-4 rounded-3 bg-light">
    <div class="mb-3">
      <label class="form-label fw-bold">请选择您关心的社保领域（可多选）：</label>
      <div class="form-check">
        <input class="form-check-input" type="checkbox" name="concern" value="pension" id="pension">
        <label class="form-check-label" for="pension">
          养老保险
        </label>
      </div>
      <div class="form-check">
        <input class="form-check-input" type="checkbox" name="concern" value="medical" id="medical">
        <label class="form-check-label" for="medical">
          医疗保险
        </label>
      </div>
      <div class="form-check">
        <input class="form-check-input" type="checkbox" name="concern" value="unemployment" id="unemployment">
        <label class="form-check-label" for="unemployment">
          失业保险
        </label>
      </div>
      <div class="form-check">
        <input class="form-check-input" type="checkbox" name="concern" value="injury" id="injury">
        <label class="form-check-label" for="injury">
          工伤保险
        </label>
      </div>
      <div class="form-check">
        <input class="form-check-input" type="checkbox" name="concern" value="maternity" id="maternity">
        <label class="form-check-label" for="maternity">
          生育保险
        </label>
      </div>
    </div>
    <button type="submit" class="btn btn-success">提交</button>
  </form>

  <div class="mt-5 text-center text-muted">
    <p>民有所呼、政有所应 — 社保服务优化调研</p>
  </div>
</div>

<!-- 引入Bootstrap5 JS (可选，本页面不涉及交互组件) -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>